home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun 1986 May & June
/
rerun-1986-05-06.d64
/
label maker
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
4KB
|
133 lines
5 rem label maker 1.2 program (c)1985 by mike konshak
10 open4,4,7:printchr$(14)
15 poke53281,0:poke53280,0:print"[147][158]"
20 rw=6:pr=5:nc=34:cr$=chr$(13):b$=chr$(32):fori=1to80:s$=s$+b$:nexti
25 dim pr$(66)
30 print"[147] [204]abel [205]aker (c)1985 by [205]ike [203]onshak [146]"
35 print" [212]his program will print labels out on"
40 print" your printer. [193]fter defining the label"
45 print" you will be able to run as many copies"
50 print" of the label as you desire."
55 print" [208]ossible [213]ses:"
60 printtab(5)"[210]eturn [193]ddress [204]abels"
65 printtab(5)"[198]loppy [196]isk [204]abels"
70 printtab(5)"[201]nventory [201][196] [204]abels"
75 printtab(5)"[211]weepstakes [197]ntries"
80 printtab(5)"[200]i, [201]'m... [206]ame [212]ags"
85 print" [197]nhanced print, [195]entering and [211]erial"
90 print" [206]umbers may be formatted for an"
95 print" individual line. [208]ress [193]ny [203]ey[146]":gosub105:goto375
105 geta$:ifa$=""then105
110 return
120 print"[147] [196]esign [217]our [207]wn [204]abels [146]"
125 print" [208]ossible #[210][207][215][211] per [204]abel + 1?";rw
130 print"[145]"tab(29);:inputrw
135 print" #[210][207][215][211] to be [208]rinted on [204]abel?";pr
140 print"[145]"tab(29);:inputpr
145 print" [208]ossible #[195][200][193][210][193][195][212][197][210][211] per [210]ow?";nc
150 print"[145]"tab(29);:inputnc
155 print" [197]nter [196][193][212][193] for [197]ach [210]ow as [208]rompted "
160 print" [211]et [211]pecial [205]odes by [205]aking the [198]irst "
165 print" [195]haracter one of the following: "
170 print" ^ [146] [197]nhanced, [196]ouble [215]ide "
175 print" _ [146] [195]entered in row"
180 print" [201]f the labels are to be [211][197][210][201][193][204][201][218][197][196],"
185 print" enter the '[208]ound [211]ign' as the [204][193][211][212]"
190 print" character in the row. [212]he number will"
195 print" be printed at the end of the row."
200 print" # [146] [211]erialized [204]abels"
205 print" [206][207][212][197]: [207]nly [207][206][197] [205]ode [193]llowed per [204]ine!!"
210 print:fori=1topr
215 printi;tab(5)pr$(i):iflen(pr$(i))>34thenprint"[145][145]"tab(3);:goto218
217 print"[145]"tab(3);
218 inputpr$(i)
220 nexti:fl=1:ck=1
225 print" [210][146]evise [204]abel [211][146]ave [208][146]rint [197][146]xit"
230 gosub105:ifa$="r"ora$="[210]"then120
235 ifa$="p"ora$="[208]"then260
240 ifa$="s"ora$="[211]"thengosub455:goto260
245 ifa$="e"ora$="[197]"then375
250 goto230
260 print"[147] [208]rint [204]abels [146]"
265 nm=0:fori=1topr:
270 print" [204]abel:[146] "nf$:print"":fori=1topr
275 ifleft$(pr$(i),1)="^"thenprint""mid$(pr$(i),2,int(nc/2)):goto295
280 ifleft$(pr$(i),1)="_"then300
285 ifright$(pr$(i),1)="#"thenprintpr$(i)"9999":nm=1:goto295
290 printleft$(pr$(i),nc)
295 nexti:goto305
300 printleft$(s$,(nc-len(pr$(i)))/2)mid$(pr$(i),2,nc):goto295
305 print" [200]ow [205]any [204]abels [0 to [197][216][201][212]]";:inputn:ifn=0then375
310 ifnm=1thenprint" [211]tarting [193]t [204]abel [206]umber ? 1[157][157][157]";:inputnm:ifnm=0then375
320 print:fori=1ton:print" [208][210][201][206][212][201][206][199]"i"[145]":forj=1topr
325 ifleft$(pr$(j),1)="^"then350
330 ifleft$(pr$(j),1)="_"then365
335 ifright$(pr$(j),1)="#"thenprint#4,pr$(j)str$(i+nm-1):goto355
340 print#4,left$(pr$(j),nc):goto355
350 print#4,chr$(14)mid$(pr$(j),2,int(nc/2))chr$(15)
355 nextj:fork=1torw-pr:print#4," ":nextk
360 nexti:goto375
365 print#4,left$(s$,(nc-len(pr$(j)))/2)mid$(pr$(j),2,nc):goto355
375 print"[147] [207]ption [205]enu [146]"
380 print" [196][146]esign [204]abel"
385 print" [204][146]oad [204]abel [198]rom [196]isk"
390 iffl<>0then print" [211][146]ave [204]abel to [196]isk"
395 iffl<>0then print" [208][146]rint [204]abels"
400 print" $[146] [196]irectory"
405 print" [209][146]uit [208]rogram"
410 print" [208]ress the [193]ppropriate [203]ey "
415 gosub105:ifa$="q"ora$="[209]"thengosub575:close4:print"[147]":end
420 ifa$="p"ora$="[208]"then260
425 ifa$="l"ora$="[204]"thengosub575:gosub500:goto375
430 ifa$="d"ora$="[196]"then120
435 ifa$="s"ora$="[211]"thengosub455:goto375
440 ifa$="$"thengoto605
445 goto415
455 print" [211]ave [204]abel [213]nder [198]ile? "nf$
460 print"[145]"tab(22);:inputnf$:ifnf$=""then375
465 iflen(nf$)>12thenprint"12 [195]hrs [205]ax":print"[145][145][145]":goto455
470 open15,8,15:print#15,"s0:lm] "+nf$:gosub550:ifet=8then375
475 open5,8,5,"0:lm] "+nf$+",s,w":gosub550:ifet=8then375
480 print#5,rw;cr$;pr;cr$;nc:gosub550:ifet=8then375
482 fori=1topr:pr$=pr$(i):ifpr$=""thenpr$=">"
485 print#5,pr$:nexti:gosub550:ifet=8then550
490 gosub565:ck=0:return
500 print" [204]oad [204]abel [198]rom [198]ile? "nf$
505 print"[145]"tab(21);:inputnf$:ifnf$=""then375
510 iflen(nf$)>12thenprint"12 [195]hrs [205]ax":print"[145][145][145]":goto500
515 open15,8,15:open5,8,5,"0:lm] "+nf$+",s,r":gosub550:ifet=8then375
520 ifen=62thengosub555:goto375
525 input#5,rw,pr,nc:gosub550:ifet=8then550
530 fori=1topr:input#5,pr$(i):ifpr$(i)=">"thenpr$(i)=""
532 nexti:gosub550:ifet=8then550
535 s=st:ifs<>0then540
540 gosub565:fl=1:return
550 input#15,en,em$,et,es:ifen<20oren=62thenet=0:return
555 print" [196]isk [197][210][210][207][210][146]"en"[157], "em$","et"[157],"es:et=8
560 print" [208]ress [193]ny [203]ey[146] to [195]ontinue":gosub105
565 close5:close15:return
575 ifck=0thenreturn
580 print" [217]ou [200]ave [206][207][212] [211]aved [217]our [195]hanges!"
585 print" [208]ress [211][146]ave [204]abel [195][146]ontinue"
590 gosub105:ifa$="c"ora$="[195]"thenreturn
595 ifa$="s"ora$="[211]"thengosub455:return
605 open15,8,15:open5,8,0,"$0":print"[147]":gosub550:ifet=8then375
610 get#5,a1$,a2$
615 get#5,a1$,a2$
620 get#5,a1$,a2$
625 ifa1$<>""thena0=asc(a1$)
630 ifa2$<>""thena0=a0+asc(a2$)*256
635 printmid$(str$(a0),2);tab(3);
640 get#5,a2$:ifst<>0then685
645 ifa2$<>chr$(34)then640
650 get#5,a2$:ifa2$<>chr$(34)thenprint""a2$"[146]";:goto650
655 get#5,a2$:ifa2$=chr$(32)then655
660 printtab(20);:a3$=""
665 a3$=a3$+a2$:get#5,a2$:ifa2$<>""then665
670 printleft$(a3$,3)
675 geta$:ifa$<>""thengosub695
680 ifst=0then615
685 print" blocks free";:a0=0
690 close5:close15:printtab(25)"[208]ress [193][206][217] [203][197][217][146]":gosub105:goto375
695 gosub105:return